<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
// import { login, logout, getInfo, getMenudata } from '@/api/user'
export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  // data() {
  //   return {
  //     list: null,
  //     listLoading: true
  //   }
  // },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      this.listLoading = true
      // const params = {
      //   org_id: '',
      //   grid_id: '',
      //   pageindex: 1,
      //   pagesize: 20,
      //   id: 0
      // }

      // this.$api.auth.getMenudata({}).then(response => {
      //   console.log('response', response)
      //   //  登录接口调用后，调用路由接口，后端返回相应用户的路由res.router，我们需要存储到store中，方便其他地方拿取
      //   this.$store.dispatch('user/addRoutes', response.data)
      // })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
